﻿using System;
using System.Data.SqlTypes;

namespace SubjectWorkShop.Core.Model
{
    /// <summary>
    /// 新闻状态
    /// </summary>
    public enum ESubjectState
    {
        待发布 = 0,
        已发布 = 1,
        已禁用 = 2,
        已删除 = 9
    }

    public class SubjectInfo
    {
        #region 私有成员

        private SqlInt32 _id;
        private SqlString _name;
        private SqlString _keywords;
        private SqlString _url;

        private SqlString _image;
        private SqlString _des;
        private SqlDateTime _time_add;
        private SqlInt16 _weight;
        private SqlInt16 _state;


        public SqlInt32 ID
        {
            get { return _id; }
            set { _id = value; }
        }
        public SqlString Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public SqlString Keywords
        {
            get { return _keywords; }
            set { _keywords = value; }
        }
        public SqlString Url
        {
            get { return _url; }
            set { _url = value; }
        }
        public SqlString Image
        {
            get { return _image; }
            set { _image = value; }
        }
        public SqlString Des
        {
            get { return _des; }
            set { _des = value; }
        }
        public SqlDateTime TimeAdd
        {
            get { return _time_add; }
            set { _time_add = value; }
        }
        public SqlInt16 Weight
        {
            get { return _weight; }
            set { _weight = value; }
        }
        public SqlInt16 State
        {
            get { return _state; }
            set { _state = value; }
        }

        #endregion 

        #region 构造函数

        public SubjectInfo() { }

        /// <summary>
        /// Constructor with specified initial values
        /// </summary>
        /// <param name="id">专题ID</param>
        /// <param name="name">专题名</param>
        /// <param name="keywords">关键字</param>
        /// <param name="image">图片描述</param>
        /// <param name="des">文字描述</param>
        /// <param name="timeadd">创建时间</param>
        /// <param name="weight">权重</param>
        /// <param name="clickCounter">点击量</param>
        /// <param name="state">状态</param>
        public SubjectInfo(SqlInt32 id, SqlString name, SqlString keywords,SqlString url, SqlString image, SqlString des, SqlDateTime timeadd, SqlInt16 weight, SqlInt16 state)
        {
            this._id = id;
            this._name = name;
            this._keywords = keywords;
            this._url = url;
            this._image = image;
            this._des = des;
            this._time_add = timeadd;
            this._weight = weight;
            this._state = state;
        }


        #endregion
    }
}
